package com.miyake.dsp.otdr;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

public class FiberManager {
	private HashMap<String, Fiber> map;
	
	public FiberManager() {
		map = new HashMap<String, Fiber>();
		
		Fiber fiber = new Fiber("Default");
		fiber.addProperties(new FiberProperties(1310, -80, 1.3, -0.0002));
		fiber.addProperties(new FiberProperties(1550, -80, 1.5, -0.0002));
		fiber.addProperties(new FiberProperties(1650, -80, 1.6, -0.0002));
		addFiber(fiber);

	}
	public void addFiber(Fiber fiber) {
		map.put(fiber.getName(), fiber);
	}
	public Fiber getFiber(String string) {
		return map.get(string);
	}
	
	public List<String> getNameList() {
		Iterator<String> it = map.keySet().iterator();
		List<String> ret = new ArrayList<String>();
		while(it.hasNext()) {
			ret.add(it.next());
		}
		return ret;
	}
}
